package Util;


public class ValidationUtil {
    public static String EMAIL_REGEX= "\\w{3,}(\\.\\w+)*@[A-z0-9]+(\\.[A-z]{2,5}){1,2}$";
    public static String PASSWORD_REGEX = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{6,64}$" ;

    /*
    * 判断邮箱是否符合格式
    * */
    public static boolean isValidEmail(String email) {
          return email.trim().matches(EMAIL_REGEX);
    }

    /*
     判断密码是否符合格式
    * */
    public static  boolean isValidPassword(String password) {
        return password.trim().matches(PASSWORD_REGEX);
    }


}
